# coding: utf-8
#--------------------#
# Coder  : Dzlua
# Email  : 505544956@qq.com
# module : scheduler
# file   : config.py
# Time   : 2017/09/29
#--------------------#
import datetime, time

#--------------------#
# state
DBPS_NONE          = 0
DBPS_START         = 1
DBPS_OK            = 2
DBPS_FAILED        = 4
DBPS_FAILED_UNPACK = 5

#
DBPS_FIND = DBPS_NONE

#--------------------#
# database
DB_SHOW_INFO = False
DB_HOST      = 'localhost'
DB_USER      = 'dzlua'
DB_PASSWORD  = 'dzlua'
DB_DATABASE  = 'wordpress'
#
DB_POSTS              = 'wp_posts'
DB_TERM_TAXONOMY      = 'wp_term_taxonomy'
DB_TERM_RELATIONSHIPS = 'wp_term_relationships'
DB_PKGS               = 'wp_userfilelib'

#--------------------#
# thread pool
TP_THREAD_NUM = 4

#--------------------#
# scheduler
SCHED_SHOW_INFO  = True
SCHED_POSTS_TIME = {
    'trigger': 'interval',
    'minutes': 5
    }
SCHED_PKG_TIME = {
    #'trigger': 'date',
    #'run_date': datetime.datetime.now(),
    'trigger': 'interval',
    #'days': 1
    'minutes': 5
    }

#--------------------#
# cole make
CM_BIN               = '/home/dzlua/dzlua/tmp/scheduler/colemake'
CM_POSTS_LIB_PATH    = '/home/dzlua/dzlua/tmp/scheduler/libs/posts'
CM_PKGS_LIB_PATH     = '/home/dzlua/dzlua/tmp/scheduler/libs/pkgs'
CM_PKGS_PKGS_PATH    = '/var/www/html/mywordpress/wp-content/uploads/pkgs/'
CM_PKGS_UNPACK_PATH  = '/home/dzlua/dzlua/tmp/scheduler/unpkgs/'

#--------------------#
